package sample3;

public class Main {
	public static void main(String[] args) {
		
		Polygon triangle = new Triangle(10.0,20.0);
		
		System.out.print("高さ１０、底辺２０の三角形の面積は");
		System.out.println(triangle.area());
		
		Polygon rectangle = new Rectangle(10.0,20.0);
		
		System.out.print("高さ１０、底辺２０の四角形の面積は");
		System.out.println(rectangle.area());
		
	}
}
